import httpService from './apiIndex'

const apiUrl=import.meta.env.VITE_API_URL; //http://localhost
//console.log('VITE_API_URL: ',apiUrl);


/* export function getDecryptPhone(url:string,data:wxDecryptPhone) {
  return httpService.post(apiUrl+url, data)
} */


export function reqRequest(url: string, data: any = {},  options: Recordable = {}) {
  let reqUrl=url.indexOf("http")===-1?apiUrl+url:url;
  /*console.warn("请求reqUrl",reqUrl);
   */
  // console.log("请求options",options)
  // if(options.method==='POST' || options.method==='post'){
	 //  data.token=uni.getStorageSync("token") || null;
  // }
  // console.log("请求data",data)
  return httpService.reqRequest(reqUrl,data,options);
}